package acceptanceTests.readingAmessage;

public interface ReadingAmessageInt {
//
	/**
	 * we wanted to check if the user can get to a message, any message. because we don't know
	 * how many items/post/messages are in the forum, or how it is implemented, we just need a
	 * path to message.
	 * @return	a legal path to message. legal means message that a regular user can see.
	 */
	public String getLegalPathToMessage();

	/**
	 * by giving a path and a user type, the user need to get to the item in the end af the path
	 * @param path - a path to a message
	 * @param userType - the authorization of the user (administrator, guest...)
	 * @return the object which represent the message
	 */
	public Object goToMessage(String path);

	/**
	 *
	 * @param path - a path for any type of item in the forum
	 * @param userType  - the authorization of the user (administrator, guest...)
	 * @return true if the user is able to get to the item in the end of the path,
	 * 			false otherwise.
	 */
	public boolean goToPath(String path, int userType);

	/**
	 * the specified user need to read the specified message
	 * @param o - an object which represent a message
	 * @param userName - the user name of an existing user
	 */
	public boolean readMessage(Object o,String userName);

	/**
	 *
	 * @param userName  - the user name of an existing user
	 * @return   the authorization of the user (administrator, guest...)
	 */
	public int getUserType(String userName);

	/**
	 *
	 * @param message - an object which represent a message
	 * @return a string which represent the complete path to the message from the root of the forum
	 */
	public String getMessagePath(Object message);

}
